package cn.vshare.controller;

import cn.vshare.entity.Kind;
import cn.vshare.service.KindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class KindController {
    @Autowired
    private KindService kindService;
    @RequestMapping("/queryAllKind")
    public List<Kind> queryAllKind(){
        List<Kind> list = kindService.queryAllKind();
        System.out.println(list);
        return list;
   }

//    List<Kind> queryAllKindByUserId(String userId);
    @RequestMapping("queryAllKindByUserId")
    public List<Kind> queryAllKindByUserId(String myId){
        List<Kind>  list= kindService.queryAllKindByUserId(myId);
        System.out.println(111111);
        return  list;
    }



    public KindService getKindService() {
        return kindService;
    }

    public void setKindService(KindService kindService) {
        this.kindService = kindService;
    }
}
